<?php
class LogBSN extends GenericBSN {

	function __construct() {
		$this->dao = new LogDAO();		
	}

	public function consultar($vars) {
		$this->preencher($vars);
		$this->Records = $this->dao->consultar($this->where, $this->params, $this->order . $this->limit);
		$this->Result  = "OK";
	}
	
	public function limparLog() {
		try {
			$this->dao->limparLog();
			$this->Result = "OK";
		} catch (Exception $e) {
			$this->Result = "ERROR";
			$this->Message = "Erro ao limpar log: " . $e->getMessage();
		}
	}
	
}
?>